package com.example.administrator.gplineview;

import android.graphics.Color;
import android.support.annotation.ColorInt;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;
import java.util.List;

public class RoundViewActivity extends AppCompatActivity {

    private RoundPercentView mRoundView;
    private List<Float> mPercents;
    private List<Integer> mColors;
    private List<String> mContents;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_round_view);

        mPercents = new ArrayList<>();
        mContents = new ArrayList<>();
        mColors = new ArrayList<>();
        mPercents.add(20f);
        mPercents.add(30f);
        mPercents.add(50f);
        mContents.add("100");
        mContents.add("320");
        mContents.add("10");
        mColors.add(Color.RED);
        mColors.add(Color.GREEN);
        mColors.add(Color.CYAN);
        mRoundView = (RoundPercentView) findViewById(R.id.round_view);
        try {
            mRoundView.setData(mPercents,mContents,mColors);
        } catch (Exception e) {
            Logger.i(e.getMessage());
        }
    }
}
